<?php
$myFile = "error_log";
$fh = fopen($myFile, 'r');
$fileSize = filesize($myFile);
$theData = "";
if ($fileSize > 0) {
	$theData = fread($fh, $fileSize);
	fclose($fh);
}
echo "<h2>Admin Folder Error Log</h1>";
?>
<input type="button" value="Clear" onclick="document.location.href='clearErrorLog.php?file=admin'"><br>
<?
echo str_replace("\n", "<br>", $theData);
echo "<br><br>";
$myFile = "../home/error_log";
$fh = fopen($myFile, 'r');
$fileSize = filesize($myFile);
$theData = "";
if ($fileSize > 0) {
	$theData = fread($fh, $fileSize);
	fclose($fh);
}
echo "<h2>Home Folder Error Log</h1>";
?>
<input type="button" value="Clear" onclick="document.location.href='clearErrorLog.php?file=home'"><br>
<?
echo str_replace("\n", "<br>", $theData);
echo "<br><br>";
$myFile = "../round/error_log";
$fh = fopen($myFile, 'r');
$fileSize = filesize($myFile);
$theData = "";
if ($fileSize > 0) {
	$theData = fread($fh, $fileSize);
	fclose($fh);
}
echo "<h2>Round Folder Error Log</h1>";
?>
<input type="button" value="Clear" onclick="document.location.href='clearErrorLog.php?file=round'"><br>
<?
echo str_replace("\n", "<br>", $theData);
echo "<br><br>";
$myFile = "../parser/error_log";
$fh = fopen($myFile, 'r');
$fileSize = filesize($myFile);
$theData = "";
if ($fileSize > 0) {
	$theData = fread($fh, $fileSize);
	fclose($fh);
}
echo "<h2>Parser Folder Error Log</h1>";
?>
<input type="button" value="Clear" onclick="document.location.href='clearErrorLog.php?file=parser'"><br>
<?
echo str_replace("\n", "<br>", $theData);
echo "<br><br>";
?>